<?php
ob_start(); // 开启输出缓冲
// 先输出 HTML 或其他内容
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="img/sd.png">
<title>Fendli_街灯</title>
<style type="text/css">
	html,body{
		height:100%;
		width: 100%;
		padding: 0px;
		margin: 0px;
		background-image: url("img/beijing.png");
		}
	::-webkit-scrollbar{
		background-color: #fff;
		width: 0px;
	}
	::-webkit-scrollbar-thumb{
		background-color: #000;
	}
	#body{
		background-color: #FFFFFF;
		margin: 0;
		padding: 0;
	}
	::-webkit-scrollbar{
		background-color: #fff;
		width: 0px;
	}
	::-webkit-scrollbar-thumb{
		background-color: #000;
	}
	.a{
		text-decoration:none;
		color: #000;
		width: 100%;
		text-align: center;
	}
	.a:hover{
		text-decoration:none;
		color: #fff;
		width: 100%;
		text-align: center;
	}
	.back{
		width: 60px;
		height: 100%;
		padding: 0px;
		margin: 0px;
	}
	.back:hover{
		background-color: #00214f;
		width: 60px;
		height: 100%;
		padding: 0px;
		margin: 0px;
	}
	.p{
		font-weight:bolder;
		font-size: 15px;
		height: 100%;
		padding-top: 10px;
		margin: 0px;
	}
	.img{
		height: 40px;
		padding: 0px;
		margin: 0px 0px 0px 5px;
	}
	#buttoncolor{
		border:2px solid #fff;
	}
	#buttoncolor:hover{
		border:2px solid red;
	}
</style>
<script type="text/javascript">
	function popDivk(){
		// 获取div元素
		var popDivk = document.getElementById("popDivk");
		// 控制div的显示
		popDivk.style.display = "none";
		let popDiv1k = document.getElementById("popDiv1k");
		// 控制div的隐藏
		popDiv1k.style.display = "block";
		
	}
	function popDiv1k(){
		let popDiv1k = document.getElementById("popDiv1k");
		// 控制div的隐藏
		popDiv1k.style.display = "none";
		var popDivk = document.getElementById("popDivk");
		// 控制div的显示
		popDivk.style.display = "block";
	}
	function closez(){
		let popDiv1k = document.getElementById("popDiv1k");
		// 控制div的隐藏
		popDiv1k.style.display = "none";
	}
</script>
</head>
<body id="body">
	<div style="width: 100%;background-color:#fff;display: flex;height: 40px;box-shadow: 0px 0px 5px #888888;">
		<img style="height:35px;padding:2.5px 10px 0px 10px;" src="./img/标题2.png" />
		</form>
		<div style="display: flex;margin: 0px 5px 0px 5px;width: 100%;padding: 0px;">
			<div class="back"><a class="a" href="./liuyanweidengl.php" target="超链接"><p class="p">留言</p></a></div>
			<div class="back"><a class="a" href="./main.php" target="超链接"><p class="p">关于</p></a></div>
		</div>
		<?php
			error_reporting(0);//关闭提示
			$KKuser = $_COOKIE["jduser"];//获取cookie用户名
			$KKQQ =$_COOKIE["jdQQ"];//获取cookie QQ号
			if($KKuser!=NULL and $KKQQ!=NULL){
				echo 
				"<a style='text-decoration:none;' href='./yidenglu.php' target='超链接'>".
				"<div target='超链接' style='text-align:right;display: flex;width: 150px;'>".
					"<a style='text-decoration:none;' href='./admin.php' target='超链接'>".
						"<img id='buttoncolor' src='./img/shield-crown-custom.png' style='width: 20px;height: 20px;padding: 3px;border-radius:3px;margin:6px 5px 0px 0px;'/>".
					"</a>".
					"<a style='text-decoration:none;' href='./yidenglu.php' target='超链接'>".
						"<img id='buttoncolor' src='http://q1.qlogo.cn/g?b=qq&nk=".$_COOKIE['jdQQ']."&s=640' style='width: 25px;height: 25px;padding: 0px;border-radius:3px;margin:6px 5px 0px 0px;'/>".
					"</a>".
					"<form action='./PCmain.php?s=2' method='post'>".
						"<input name='s' type='hidden' value='2'>".
						"<input type='hidden' value='退出登录' name='zhuxiao'>".
						"<input id='buttoncolor' type='image' src='./img/logout-custom.png' style='width: 20px;height: 20px;padding: 3px;border-radius:3px;margin:6px 5px 0px 0px;'>".
					"</form>".
				"</div>";
				//注销登录
				error_reporting(0);//关闭提示
				$s = $_GET['s'];
				$zhuxiao=$_POST['zhuxiao'];
				if($zhuxiao!=NULL)
				{
					$yonghuming = NULL;
					$mima = NULL;
					$jdQQ = NULL;
					setcookie("jduser",$yonghuming,time()+3600*24,'/');
					setcookie("jdpassword",$mima,time()+3600*24,'/');
					setcookie("jdQQ",$jdQQ,time()+3600*24,'/');
					echo '<script> alert("已退出"); window.location.reload();</script>';
					
				}
				elseif( $s!=NULL and $zhuxiao==NULL)
				{
					echo '<script> alert("退出失败"); </script>';
				}
			}
			else{
				echo
				"<div onclick='popDivk();' style='text-align:right;display: flex;width: 50px;'>".
					"<img id='buttoncolor' src='./img/user.png' style='width: 25px;height: 25px;padding: 0px;border-radius:100px;margin:6px 5px 0px 0px;'/>".
				"</div>";
			}
		?>
		<div id='popDiv1k' style='display: none;position:fixed;background-color: #ffffff;width: 330px;height: 340px;top:0;right:0;left:0;bottom:0;margin:auto;text-align:left;border: 2px solid #00214f;'>
			<img style='height:70px;padding:10px;margin: 0px;' src='./img/标题2.png'/>
			<center>
				<form action='./login.php' method='post' target='_blank'>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='用户名' name='yonghuming' type='text'><br>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='密码' name='mima' type='password'><br>
					<button style='width: 270px;border:0px;margin-top: 5px;background-color: #00214f;color:#ffffff;font-weight:bold;padding:10px 0px 10px 0px;'>登录</button>
				</form>
				<button onclick='popDiv1k();'style='width: 270px;border:0px;margin-top: 5px;background-color: #00214f;color:#ffffff;font-weight:bold;padding:10px 0px 10px 0px;'>注册</button>
				<button onclick='closez();'style='width: 270px;border:0px;margin-top: 5px;background-color: #00214f;color:#ffffff;font-weight:bold;padding:10px 0px 10px 0px;'>关闭</button>
			</center>
		</div>
		
		<div id='popDivk' style='display: none;position:fixed;background-color: #ffffff;width: 330px;height: 390px;top:0;right:0;left:0;bottom:0;margin:auto;text-align:left;border: 2px solid #00214f;'>
			<img style='height:70px;padding:10px;margin: 0px;' src='./img/标题2.png' />
			<center>
				<form action='./zhuce.php' method='post'>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='用户名' name='yonghumingzc' type='text'><br>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='密码' name='mimazc' type='password'><br>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='确认密码' name='mima2zc' type='password'><br>
					<input style='width: 250px;height: 35px;border:0px;margin-bottom: 5px;padding-left: 15px;border: 2px solid #00214f;' placeholder='QQ号' name='QQzc' type='text'><br>
					<button style='width: 270px;border:0px;margin-top: 5px;background-color: #00214f;color:#ffffff;font-weight:bold;padding:10px 0px 10px 0px;'>注册</button>
				</form>
				<button onclick='popDivk();'style='width: 270px;border:0px;margin-top: 5px;background-color: #00214f;color:#ffffff;font-weight:bold;padding:10px 0px 10px 0px;'>返回</button>
			</center>
		</div>
	</div>
	<iframe src="./liuyanweidengl.php" name="超链接" style="width: 100%;height: 100%;border-width:0px;"></iframe>
</body>
</html>
